<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateDocumentInfoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('document_info', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name');
			$table->string('document_no')->nullable();
			$table->string('revision')->nullable();
			$table->text('description', 65535)->nullable();
			$table->integer('file');
			$table->integer('project')->nullable();
			$table->integer('task')->nullable();
			$table->integer('order')->nullable();
			$table->integer('quality')->nullable();
			$table->string('visibility', 45)->nullable();
			$table->timestamp('insert_date')->nullable()->default(DB::raw('CURRENT_TIMESTAMP'));
			$table->integer('ecn')->nullable()->default(-1);
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('document_info');
	}

}
